package com.ebs.md.mock.centralrepo;

/**
 * Revision Author:
 *  $File: //depot/MarketData/fxmonitor/main/src/test/java/com/ebs/md/mock/centralrepo/TranslatorMock.java $
 *  $Revision: #2 $
 *  $DateTime: 2012/06/26 14:25:10 $
 *  $Change: 112066 $
 *  $Author: Arik.Sher $
 */

import java.math.BigDecimal;
import java.util.Map;
import java.util.Set;

import com.ebs.centralrepository.api.BinfileName;
import com.ebs.centralrepository.api.BinfileRecord;
import com.ebs.centralrepository.api.Currency;
import com.ebs.centralrepository.api.CurrencyPair;
import com.ebs.centralrepository.api.DatasourceException;
import com.ebs.centralrepository.api.Floor;
import com.ebs.centralrepository.api.GlobalRecord;
import com.ebs.centralrepository.api.Precision;
import com.ebs.centralrepository.api.Translator;
import com.ebs.centralrepository.api.UnknownKeyException;
import com.ebs.commons.comp.IParsedPayload;
import com.ebs.marketdata.dictionary.PriceContext;
import com.ebs.marketdata.dictionary.Qfloat;
import com.ebs.marketdata.dictionary.SimplePrice;


public class TranslatorMock
implements Translator
{

	public String convertPrice(int packedQFloat, int baseCurrency,
			int localCurrency) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public CurrencyPair getCurrencyPair(String shortName) throws UnknownKeyException {
		String[] splitedIso = shortName.split("/");
		
		return new CurrencyPairMock(splitedIso[0], splitedIso[1]);
	}

	public PriceContext getPriceContext(String ccyPairIsoShortName) {
		CurrencyPair currencyPair;
		try {
			currencyPair = getCurrencyPair(ccyPairIsoShortName);
		} catch (UnknownKeyException e) {
			return null;
		}
		
		Precision prec = currencyPair.getPrecision();
		
		PrecisionMock precision = (PrecisionMock)prec;
		
		return precision.getPriceContext();
	}


	public String convertPrice(int packedQFloat, int currencyPairId)
			throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public String convertPrice(int packedQFloat) {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createAdjSimplePrice(int baseCcyId, int localCcyId,
			int packedQFloat) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createPointsSimplePrice(int baseCcyId, int localCcyId,
			int packedQFloat) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			BigDecimal price) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			double price) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			int packedQFloat, int addPrecision) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			int packedQfloat) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}


	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			Qfloat qfloatPrice, int addPrecision) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			Qfloat qfloatPrice) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(int baseCcyId, int localCcyId,
			String unscaledPrice) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public SimplePrice createSimplePrice(String scaledPrice) {
		throw new UnsupportedOperationException();
	}

	public String dumpFloors() {
		throw new UnsupportedOperationException();
	}

	public long getAbsAmount(int baseCcyId, int localCcyId, int rawAmt)
			throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public Map<Number, Floor> getAllChildren(int floorKey) {
		throw new UnsupportedOperationException();
	}

	public Currency getCurrency(Number id) throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}

	public CurrencyPair getCurrencyPair(int baseId, int localId)
			throws UnknownKeyException {
		throw new UnsupportedOperationException();
	}


	public Set<CurrencyPair> getCurrencyPairs() {
		throw new UnsupportedOperationException();
		
	}


	public String getDealCode(int key) throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public Floor getFloor(int floorId) throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public Floor getFloor(String dealCode) throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public GlobalRecord getGlobal() {
		throw new UnsupportedOperationException();
		
	}


	public int getIntPairAdjPips(int baseCcyId, int localCcyId) {
		throw new UnsupportedOperationException();
		
	}


	public int getIntPairAdjPips(int pairID) {
		throw new UnsupportedOperationException();
		
	}


	public Number getLookupCurrency(String currencyName) {
		throw new UnsupportedOperationException();
		
	}


	public Number getMaxCurrencyId() {
		throw new UnsupportedOperationException();
		
	}

	public Set<? extends BinfileRecord> getRecords(BinfileName binfileName) {
		throw new UnsupportedOperationException();
		
	}


	public int getScaledAmount(int baseCcyId, int localCcyId, int rawAmt)
			throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public int getStrPairAdjPips(String ccyPairIsoName) {
		throw new UnsupportedOperationException();
		
	}


	public int getVersion(String key) throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public boolean isChildOf(int partyFloorKey, int counterPartyFloorKey,
			Set<Number> parentFloorKeys) {
		throw new UnsupportedOperationException();
	}


	public boolean isChildOf(int floorKey, Set<Number> parentFloorKeys) {
		throw new UnsupportedOperationException();
	}


	public Set<Number> lookupCurrency(String isoCodeAlias)
			throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public Number lookupCurrencyPair(String shortName)
			throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public int lookupDealCode(String dealCode) throws UnknownKeyException {
		throw new UnsupportedOperationException();
		
	}


	public void refresh() throws DatasourceException {
		throw new UnsupportedOperationException();
	}


	public void verifyBinfileVersions(IParsedPayload binFileMessage) {
		throw new UnsupportedOperationException();
		
	}

}
